<div class="wrapper">
    <div class="container" id="main">
        <div class="program">
            <div class="cover">
				<a href="<?php echo program_url($program->PROG_CODE) ;?>">
                <div class="img_outer" style="background-image: url(<?php echo $program->PROG_COVER; ?>) ">
                    <!--<img src="<?php echo $program->PROG_COVER; ?>" alt="" />-->
                </div>
                <div class="description">
                    <h4 class="title">

                        <?php echo $program->PROG_TITLE; ?>
						
                    </h4>
                    <h5 class="subtitle">
                       &nbsp;
                    </h5>
                </div>
				</a>
            </div>
            <div class="clear"></div>
        </div>
<?php
if ($series) foreach ($series as $sery) {
$vs = $this->mvideo->gets_by_series($sery->SER_ID, 4);
if (count($vs) <= 0) 
	continue;
?>
        <div class="main-list">
            <div class="title">
				<?php echo $sery->SER_TITLE;?>
                <span></span>
            </div>
<?php if ($vs) foreach ($vs as $v) { ?>
            <div class="main-item">
				<a href="<?php echo video_url($v->VID_ID, $v->VID_CODE, $program->PROG_CODE); ?>">
                <div class="thumb"><img src="<?php echo video_image($v->VID_LINK); ?>; ?>" alt="" />
				<div class="duration"><?php echo date("i:s", $v->VID_TIME);?></div>
				</div>
                <div class="description">
                    <h4 class="title">
                        <?php echo $v->VID_TITLE; ?>
                    </h4>
                    <h5 class="subtitle">
                        &nbsp;
                    </h5>
                </div>
				</a>
                <div class="clear"></div>
            </div>
<?php 	} ?>
        </div>	
<?php } ?>
        <div class="clear"></div>
    </div><!--end of #main-->
</div>

<?php /*
  <div class="home-list">
  <?php

  if ($program) {
  $series = $this->mseries->getsByProgram($program->PROG_ID, 10);
  ?>
  <div class="home-item">
  <?php
  $prog_url = program_url($program->PROG_CODE);
  ?>
  <a href="<?php echo $prog_url; ?>" class="item-preview">
  <img src="<?php echo $program->PROG_COVER; ?>" alt="<?php echo $program->PROG_TITLE; ?>" />
  </a>
  <div class="description">
  <h4 class="title">
  <a href="<?php echo $prog_url; ?>">
  <?php echo $program->PROG_TITLE; ?>
  </a>
  </h4>
  <h5 class="subtitle">
  <?php echo $program->PROG_DESCRIPTION; ?>&nbsp;
  </h5>
  </div>
  <div class="clear"></div>
  <br />
  <?php
  //Begin List Series
  if ($series) foreach($series as $sery) {

  $series_link  = series_url($sery->SER_CODE, 0);
  $videos = $this->mvideo->getsBySeries($sery->SER_ID, 0);
  ?>
  <h2>
  <a href="<?php echo $series_link ; ?>">
  <?php echo $sery->SER_TITLE; ?>
  </a>
  </h2>
  <ul class="tile">
  <?php
  if ($videos) foreach ($videos as $video) {
  echo '<li class="">
  <a href="'. video_url($video->VID_ID, $video->VID_CODE,$program->PROG_CODE) .'" title="'.$video->VID_TITLE.'">
  <img src="'.$video->VID_THUMB.'" alt="" />
  <h5 class="description">'.$video->VID_TITLE.'</h5>
  </a></li>';
  }
  ?>
  <?php
  } //End List Series
  ?>
  </ul>
  </div>

  <?php
  }?>

  </div>
  <style type="text/css">
  .tile {style-list:none; }
  .tile li {display: inline-block; margin-right 10px;margin-right: 5px;overflow: hidden;
  width: 225px;height: 126px;}
  .tile li img {width: 225px; height: 126px;}
  .tile li h5 {margin-top: -37px; color: white;text-align:left;line-height: 25px;}

  </style>
  <script type="text/javascript">
  $(function() {

  } );
  </script><?php
 * 
 */ ?>